package com.tydic.product.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum ProductGroup {
    DEFAULT("0"),

    CHILD("1"),

    PARENT("2");

    private final String status;

    public static ProductGroup of(String status) {
        for (ProductGroup value : values()) {
            if (value.getStatus().equals(status)) {
                return value;
            }
        }
        return null;
    }
}
